").addClass("sl-image"),w=e("
").addClass("sl-wrapper").addClass(i.className),E=function(t){return i.fileExt?"a"==e(t).prop("tagName").toLowerCase()&&new RegExp(".("+i.fileExt+")$","i").test(e(t).attr("href")):!0},C=function(){i.close&&g.appendTo(w),i.showCounter&&d.length>1&&(m.appendTo(w),m.find(".sl-total").text(d.length)),i.nav&&u.appendTo(w),i.spinner&&f.appendTo(w)},T=function(t){t.trigger(e.Event("show.simplelightbox")),i.disableScroll&&P("hide"),w.appendTo("body"),y.appendTo(w),i.overlay&&h.appendTo(e("body")),v=!0,x=d.index(t),o=e("
").hide().attr("src",t.attr("href")),-1==r.indexOf(t.attr("href"))&&r.push(t.attr("href")),y.html("").attr("style",""),o.appendTo(y),q(),h.fadeIn("fast"),e(".sl-close").fadeIn("fast"),f.show(),u.fadeIn("fast"),e(".sl-wrapper .sl-counter .sl-current").text(x+1),m.fadeIn("fast"),S(),i.preloading&&M(),setTimeout(function(){t.trigger(e.Event("shown.simplelightbox"))},i.animationSpeed)},S=function(n){if(o.length){var a=new Image,s=e(t).width()*i.widthRatio,p=e(t).height()*i.heightRatio;a.src=o.attr("src"),e(a).bind("error",function(t){return d.eq(x).trigger(e.Event("error.simplelightbox")),v=!1,l=!0,f.hide(),i.alertError?(alert(i.alertErrorMessage),void R(1==n||-1==n?n:1)):void 0}),a.onload=function(){"undefined"!=typeof n&&d.eq(x).trigger(e.Event("changed.simplelightbox")).trigger(e.Event((1===n?"nextDone":"prevDone")+".simplelightbox")),-1==r.indexOf(o.attr("src"))&&r.push(o.attr("src"));var h=a.width,g=a.height;if(h>s||g>p){var u=h/g>s/p?h/s:g/p;h/=u,g/=u}e(".sl-image").css({top:(e(t).height()-g)/2+"px",left:(e(t).width()-h)/2+"px"}),f.hide(),o.css({width:h+"px",height:g+"px"}).fadeIn("fast"),l=!0;var m="self"==i.captionSelector?d.eq(x):d.eq(x).find(i.captionSelector);if("data"==i.captionType)var b=m.data(i.captionsData);else if("text"==i.captionType)var b=m.html();else var b=m.prop(i.captionsData);if(i.loop||(0==x&&e(".sl-prev").hide(),x>=d.length-1&&e(".sl-next").hide(),x>0&&e(".sl-prev").show(),x
").html(i.additionalHtml).addClass("sl-additional-html").appendTo(e(".sl-image"))}}},k=function(t){""!=t&&"undefined"!=typeof t&&i.captions&&b.html(t).hide().appendTo(e(".sl-image")).delay(i.captionDelay).fadeIn("fast")},I=function(t,n){var i={};i[s+"transform"]="translateX("+n+")",i[s+"transition"]=s+"transform "+t+"s linear",e(".sl-image").css(i)},q=function(){e(t).on("resize."+p,S),e(n).on("click."+p+" touchstart."+p,".sl-close",function(e){e.preventDefault(),l&&O()}),u.on("click."+p,"button",function(t){t.preventDefault(),a=0,R(e(this).hasClass("sl-next")?1:-1)});var o=0,s=0,r=!1,h=0;y.on("touchstart."+p+" mousedown."+p,function(e){return r?!0:(c&&(h=parseInt(y.css("left"))),r=!0,o=e.originalEvent.pageX||e.originalEvent.touches[0].pageX,!1)}).on("touchmove."+p+" mousemove."+p+" pointermove MSPointerMove",function(e){return r?(e.preventDefault(),s=e.originalEvent.pageX||e.originalEvent.touches[0].pageX,a=o-s,void(i.animationSlide&&(c?I(0,-a+"px"):y.css("left",h-a+"px")))):!0}).on("touchend."+p+" mouseup."+p+" touchcancel."+p+" mouseleave."+p+" pointerup pointercancel MSPointerUp MSPointerCancel",function(e){if(r){r=!1;var t=!0;i.loop||(0==x&&0>a&&(t=!1),x>=d.length-1&&a>0&&(t=!1)),Math.abs(a)>i.swipeTolerance&&t?R(a>0?1:-1):i.animationSlide&&(c?I(i.animationSpeed/1e3,"0px"):y.animate({left:h+"px"},i.animationSpeed/2))}})},D=function(){u.off("click","button"),e(n).off("click."+p,".sl-close"),e(t).off("resize."+p)},M=function(){var t=0>x+1?d.length-1:x+1>=d.length-1?0:x+1,n=0>x-1?d.length-1:x-1>=d.length-1?0:x-1;e("").attr("src",d.eq(t).attr("href")).load(function(){-1==r.indexOf(e(this).attr("src"))&&r.push(e(this).attr("src")),d.eq(x).trigger(e.Event("nextImageLoaded.simplelightbox"))}),e("").attr("src",d.eq(n).attr("href")).load(function(){-1==r.indexOf(e(this).attr("src"))&&r.push(e(this).attr("src")),d.eq(x).trigger(e.Event("prevImageLoaded.simplelightbox"))})},R=function(t){d.eq(x).trigger(e.Event("change.simplelightbox")).trigger(e.Event((1===t?"next":"prev")+".simplelightbox"));var n=x+t;if(!(v||(0>n||n>=d.length)&&0==i.loop)){x=0>n?d.length-1:n>d.length-1?0:n,e(".sl-wrapper .sl-counter .sl-current").text(x+1);var s={opacity:0};i.animationSlide&&(c?I(i.animationSpeed/1e3,-100*t-a+"px"):s.left=parseInt(e(".sl-image").css("left"))+-100*t+"px"),e(".sl-image").animate(s,i.animationSpeed,function(){setTimeout(function(){var n=d.eq(x);o.attr("src",n.attr("href")),-1==r.indexOf(n.attr("href"))&&f.show(),e(".sl-caption").remove(),S(t),i.preloading&&M()},100)})}},O=function(){if(!v){var t=d.eq(x),n=!1;t.trigger(e.Event("close.simplelightbox")),e(".sl-image img, .sl-overlay, .sl-close, .sl-navigation, .sl-image .sl-caption, .sl-counter").fadeOut("fast",function(){i.disableScroll&&P("show"),e(".sl-wrapper, .sl-overlay").remove(),D(),n||t.trigger(e.Event("closed.simplelightbox")),n=!0}),o=e(),l=!1,v=!1}},P=function(i){if("hide"==i){var a=t.innerWidth;if(!a){var o=n.documentElement.getBoundingClientRect();a=o.right-Math.abs(o.left)}if(n.body.clientWidth0&&e("body").addClass("hidden-scroll").css({"padding-right":l+r})}}else e("body").removeClass("hidden-scroll").css({"padding-right":e("body").data("padding")})};return C(),d.on("click."+p,function(t){if(E(this)){if(t.preventDefault(),v)return!1;T(e(this))}}),e(n).on("click."+p+" touchstart."+p,function(t){l&&i.docClose&&0==e(t.target).closest(".sl-image").length&&0==e(t.target).closest(".sl-navigation").length&&O()}),i.disableRightClick&&e(n).on("contextmenu",".sl-image img",function(e){return!1}),i.enableKeyboard&&e(n).on("keyup."+p,function(e){if(e.preventDefault(),a=0,l){var t=e.keyCode;27==t&&O(),(37==t||39==e.keyCode)&&R(39==e.keyCode?1:-1)}}),this.open=function(t){t=t||e(this[0]),T(t)},this.next=function(){R(1)},this.prev=function(){R(-1)},this.close=function(){O()},this.destroy=function(){e(n).unbind("click."+p).unbind("keyup."+p),O(),e(".sl-overlay, .sl-wrapper").remove()},this}}(jQuery,window,document);
// source --> https://webbaze.lt/wp-content/themes/newstore/js/popper.min.js?ver=5.5.3
/*
Copyright (C) Federico Zivolo 2018
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
*/(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll|overlay)/.test(r+s+p)?e:n(o(e))}function r(e){return 11===e?re:10===e?pe:re||pe}function p(e){if(!e)return document.documentElement;for(var o=r(10)?document.body:null,n=e.offsetParent;n===o&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(n.nodeName)&&'static'===t(n,'position')?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||p(e.firstElementChild)===e)}function d(e){return null===e.parentNode?e:d(e.parentNode)}function a(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);var l=r.commonAncestorContainer;if(e!==l&&t!==l||n.contains(i))return s(l)?l:p(l);var f=d(e);return f.host?a(f.host,t):a(e,d(t).host)}function l(e){var t=1=o.clientWidth&&n>=o.clientHeight}),l=0a[e]&&!t.escapeWithReference&&(n=J(f[o],a[e]-('right'===e?f.width:f.height))),ae({},o,n)}};return l.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';f=le({},f,m[t](e))}),e.offsets.popper=f,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,n=t.reference,i=e.placement.split('-')[0],r=Z,p=-1!==['top','bottom'].indexOf(i),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]r(n[s])&&(e.offsets.popper[d]=r(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var n;if(!q(e.instance.modifiers,'arrow','keepTogether'))return e;var i=o.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!i)return e;}else if(!e.instance.popper.contains(i))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',c=a?'bottom':'right',u=S(i)[l];d[c]-us[c]&&(e.offsets.popper[m]+=d[m]+u-s[c]),e.offsets.popper=g(e.offsets.popper);var b=d[m]+d[l]/2-u/2,y=t(e.instance.popper),w=parseFloat(y['margin'+f],10),E=parseFloat(y['border'+f+'Width'],10),v=b-e.offsets.popper[m]-w-E;return v=$(J(s[l]-u,v),0),e.arrowElement=i,e.offsets.arrow=(n={},ae(n,m,Q(v)),ae(n,h,''),n),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split('-')[0],i=T(n),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case he.FLIP:p=[n,i];break;case he.CLOCKWISE:p=z(n);break;case he.COUNTERCLOCKWISE:p=z(n,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(n!==s||p.length===d+1)return e;n=e.placement.split('-')[0],i=T(n);var a=e.offsets.popper,l=e.offsets.reference,f=Z,m='left'===n&&f(a.right)>f(l.left)||'right'===n&&f(a.left)f(l.top)||'bottom'===n&&f(a.top)f(o.right),g=f(a.top)f(o.bottom),b='left'===n&&h||'right'===n&&c||'top'===n&&g||'bottom'===n&&u,y=-1!==['top','bottom'].indexOf(n),w=!!t.flipVariations&&(y&&'start'===r&&h||y&&'end'===r&&c||!y&&'start'===r&&g||!y&&'end'===r&&u);(m||b||w)&&(e.flipped=!0,(m||b)&&(n=p[d+1]),w&&(r=G(r)),e.placement=n+(r?'-'+r:''),e.offsets.popper=le({},e.offsets.popper,C(e.instance.popper,e.offsets.reference,e.placement)),e=P(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],n=e.offsets,i=n.popper,r=n.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return i[p?'left':'top']=r[o]-(s?i[p?'width':'height']:0),e.placement=T(t),e.offsets.popper=g(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!q(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=D(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.right https://webbaze.lt/wp-content/themes/newstore/js/bootstrap.min.js?ver=5.5.3
/*!
* Bootstrap v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,g,u){"use strict";function i(t,e){for(var n=0;nthis._items.length-1||t<0))if(this._isSliding)g(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=ndocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Ee},je="show",He="out",Re={HIDE:"hide"+De,HIDDEN:"hidden"+De,SHOW:"show"+De,SHOWN:"shown"+De,INSERTED:"inserted"+De,CLICK:"click"+De,FOCUSIN:"focusin"+De,FOCUSOUT:"focusout"+De,MOUSEENTER:"mouseenter"+De,MOUSELEAVE:"mouseleave"+De},xe="fade",Fe="show",Ue=".tooltip-inner",We=".arrow",qe="hover",Me="focus",Ke="click",Qe="manual",Be=function(){function i(t,e){if("undefined"==typeof u)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=g(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(g(this.getTipElement()).hasClass(Fe))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),g.removeData(this.element,this.constructor.DATA_KEY),g(this.element).off(this.constructor.EVENT_KEY),g(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&g(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===g(this.element).css("display"))throw new Error("Please use show on visible elements");var t=g.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){g(this.element).trigger(t);var n=_.findShadowRoot(this.element),i=g.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=_.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&g(o).addClass(xe);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();g(o).data(this.constructor.DATA_KEY,this),g.contains(this.element.ownerDocument.documentElement,this.tip)||g(o).appendTo(l),g(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,o,{placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:We},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),g(o).addClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().on("mouseover",null,g.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,g(e.element).trigger(e.constructor.Event.SHOWN),t===He&&e._leave(null,e)};if(g(this.tip).hasClass(xe)){var h=_.getTransitionDurationFromElement(this.tip);g(this.tip).one(_.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=g.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==je&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),g(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(g(this.element).trigger(i),!i.isDefaultPrevented()){if(g(n).removeClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),this._activeTrigger[Ke]=!1,this._activeTrigger[Me]=!1,this._activeTrigger[qe]=!1,g(this.tip).hasClass(xe)){var r=_.getTransitionDurationFromElement(n);g(n).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Ae+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(g(t.querySelectorAll(Ue)),this.getTitle()),g(t).removeClass(xe+" "+Fe)},t.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Se(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?g(e).parent().is(t)||t.empty().append(e):t.text(g(e).text())},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:_.isElement(this.config.container)?g(this.config.container):g(document).find(this.config.container)},t._getAttachment=function(t){return Pe[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)g(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==Qe){var e=t===qe?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===qe?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;g(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),g(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Me:qe]=!0),g(e.getTipElement()).hasClass(Fe)||e._hoverState===je?e._hoverState=je:(clearTimeout(e._timeout),e._hoverState=je,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===je&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Me:qe]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=He,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===He&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=g(this.element).data();return Object.keys(e).forEach(function(t){-1!==Oe.indexOf(t)&&delete e[t]}),"number"==typeof(t=l({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_.typeCheckConfig(be,t,this.constructor.DefaultType),t.sanitize&&(t.template=Se(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ne);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(g(t).removeClass(xe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ie),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ie,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Le}},{key:"NAME",get:function(){return be}},{key:"DATA_KEY",get:function(){return Ie}},{key:"Event",get:function(){return Re}},{key:"EVENT_KEY",get:function(){return De}},{key:"DefaultType",get:function(){return ke}}]),i}();g.fn[be]=Be._jQueryInterface,g.fn[be].Constructor=Be,g.fn[be].noConflict=function(){return g.fn[be]=we,Be._jQueryInterface};var Ve="popover",Ye="bs.popover",ze="."+Ye,Xe=g.fn[Ve],$e="bs-popover",Ge=new RegExp("(^|\\s)"+$e+"\\S+","g"),Je=l({},Be.Default,{placement:"right",trigger:"click",content:"",template:'
'}),Ze=l({},Be.DefaultType,{content:"(string|element|function)"}),tn="fade",en="show",nn=".popover-header",on=".popover-body",rn={HIDE:"hide"+ze,HIDDEN:"hidden"+ze,SHOW:"show"+ze,SHOWN:"shown"+ze,INSERTED:"inserted"+ze,CLICK:"click"+ze,FOCUSIN:"focusin"+ze,FOCUSOUT:"focusout"+ze,MOUSEENTER:"mouseenter"+ze,MOUSELEAVE:"mouseleave"+ze},sn=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){g(this.getTipElement()).addClass($e+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},o.setContent=function(){var t=g(this.getTipElement());this.setElementContent(t.find(nn),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(on),e),t.removeClass(tn+" "+en)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ge);null!==e&&0
=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active",Wn='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',qn=".dropdown-toggle",Mn="> .dropdown-menu .active",Kn=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&g(this._element).hasClass(Pn)||g(this._element).hasClass(Ln))){var t,i,e=g(this._element).closest(xn)[0],o=_.getSelectorFromElement(this._element);if(e){var r="UL"===e.nodeName||"OL"===e.nodeName?Un:Fn;i=(i=g.makeArray(g(e).find(r)))[i.length-1]}var s=g.Event(On.HIDE,{relatedTarget:this._element}),a=g.Event(On.SHOW,{relatedTarget:i});if(i&&g(i).trigger(s),g(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){o&&(t=document.querySelector(o)),this._activate(this._element,e);var l=function(){var t=g.Event(On.HIDDEN,{relatedTarget:n._element}),e=g.Event(On.SHOWN,{relatedTarget:i});g(i).trigger(t),g(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){g.removeData(this._element,wn),this._element=null},t._activate=function(t,e,n){var i=this,o=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?g(e).children(Fn):g(e).find(Un))[0],r=n&&o&&g(o).hasClass(jn),s=function(){return i._transitionComplete(t,o,n)};if(o&&r){var a=_.getTransitionDurationFromElement(o);g(o).removeClass(Hn).one(_.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},t._transitionComplete=function(t,e,n){if(e){g(e).removeClass(Pn);var i=g(e.parentNode).find(Mn)[0];i&&g(i).removeClass(Pn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(g(t).addClass(Pn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),_.reflow(t),t.classList.contains(jn)&&t.classList.add(Hn),t.parentNode&&g(t.parentNode).hasClass(kn)){var o=g(t).closest(Rn)[0];if(o){var r=[].slice.call(o.querySelectorAll(qn));g(r).addClass(Pn)}t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(wn);if(e||(e=new i(this),t.data(wn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),i}();g(document).on(On.CLICK_DATA_API,Wn,function(t){t.preventDefault(),Kn._jQueryInterface.call(g(this),"show")}),g.fn.tab=Kn._jQueryInterface,g.fn.tab.Constructor=Kn,g.fn.tab.noConflict=function(){return g.fn.tab=Nn,Kn._jQueryInterface};var Qn="toast",Bn="bs.toast",Vn="."+Bn,Yn=g.fn[Qn],zn={CLICK_DISMISS:"click.dismiss"+Vn,HIDE:"hide"+Vn,HIDDEN:"hidden"+Vn,SHOW:"show"+Vn,SHOWN:"shown"+Vn},Xn="fade",$n="hide",Gn="show",Jn="showing",Zn={animation:"boolean",autohide:"boolean",delay:"number"},ti={animation:!0,autohide:!0,delay:500},ei='[data-dismiss="toast"]',ni=function(){function i(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var t=i.prototype;return t.show=function(){var t=this;g(this._element).trigger(zn.SHOW),this._config.animation&&this._element.classList.add(Xn);var e=function(){t._element.classList.remove(Jn),t._element.classList.add(Gn),g(t._element).trigger(zn.SHOWN),t._config.autohide&&t.hide()};if(this._element.classList.remove($n),this._element.classList.add(Jn),this._config.animation){var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},t.hide=function(t){var e=this;this._element.classList.contains(Gn)&&(g(this._element).trigger(zn.HIDE),t?this._close():this._timeout=setTimeout(function(){e._close()},this._config.delay))},t.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(Gn)&&this._element.classList.remove(Gn),g(this._element).off(zn.CLICK_DISMISS),g.removeData(this._element,Bn),this._element=null,this._config=null},t._getConfig=function(t){return t=l({},ti,g(this._element).data(),"object"==typeof t&&t?t:{}),_.typeCheckConfig(Qn,t,this.constructor.DefaultType),t},t._setListeners=function(){var t=this;g(this._element).on(zn.CLICK_DISMISS,ei,function(){return t.hide(!0)})},t._close=function(){var t=this,e=function(){t._element.classList.add($n),g(t._element).trigger(zn.HIDDEN)};if(this._element.classList.remove(Gn),this._config.animation){var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(Bn);if(e||(e=new i(this,"object"==typeof n&&n),t.data(Bn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n](this)}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return Zn}},{key:"Default",get:function(){return ti}}]),i}();g.fn[Qn]=ni._jQueryInterface,g.fn[Qn].Constructor=ni,g.fn[Qn].noConflict=function(){return g.fn[Qn]=Yn,ni._jQueryInterface},function(){if("undefined"==typeof g)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=g.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),t.Util=_,t.Alert=p,t.Button=P,t.Carousel=lt,t.Collapse=bt,t.Dropdown=Jt,t.Modal=ve,t.Popover=sn,t.Scrollspy=Dn,t.Tab=Kn,t.Toast=ni,t.Tooltip=Be,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=bootstrap.min.js.map;
// source --> https://webbaze.lt/wp-content/themes/newstore/js/jquery.ez-plus-custom.js?ver=5.5.3
// jscs:disable
/* jshint -W071, -W074 */
// jscs:enable
/* globals jQuery */
/*
* jQuery ezPlus 1.2.4
* Demo's and documentation:
* http://igorlino.github.io/elevatezoom-plus/
*
* licensed under MIT license.
* http://en.wikipedia.org/wiki/MIT_License
*
*/
if (typeof Object.create !== 'function') {
Object.create = function (obj) {
function F() {
}
F.prototype = obj;
return new F();
};
}
(function ($, window, document) {
var EZP = {
init: function (options, elem) {
var self = this;
self.elem = elem;
self.$elem = $(elem);
self.options = $.extend({}, $.fn.ezPlus.options, self.responsiveConfig(options || {}));
self.imageSrc = self.$elem.attr('data-'+self.options.attrImageZoomSrc) ? self.$elem.attr('data-'+self.options.attrImageZoomSrc) : self.$elem.attr('src');
if (!self.options.enabled) {
return;
}
//TINT OVERRIDE SETTINGS
if (self.options.tint) {
self.options.lensColour = 'transparent'; //colour of the lens background
self.options.lensOpacity = '1'; //opacity of the lens
}
//INNER OVERRIDE SETTINGS
if (self.options.zoomType === 'inner') {
self.options.showLens = false;
}
// LENS OVERRIDE SETTINGS
if (self.options.zoomType === 'lens') {
self.options.zoomWindowWidth = 0;
}
//UUID WHEN MISSING IDENTIFIER
if (self.options.zoomId === -1) {
self.options.zoomId = generateUUID();
}
//Remove alt on hover
self.$elem.parent().removeAttr('title').removeAttr('alt');
self.zoomImage = self.imageSrc;
self.refresh(1);
//Create the image swap from the gallery
var galleryEvent = self.options.galleryEvent + '.ezpspace';
galleryEvent += self.options.touchEnabled ? ' touchend.ezpspace' : '';
self.$galleries = $(self.options.gallery ? ('#' + self.options.gallery) : self.options.gallerySelector);
self.$galleries.on(galleryEvent, self.options.galleryItem, function (e) {
//Set a class on the currently active gallery image
if (self.options.galleryActiveClass) {
$(self.options.galleryItem, self.$galleries).removeClass(self.options.galleryActiveClass);
$(this).addClass(self.options.galleryActiveClass);
}
//stop any link on the a tag from working
if (this.tagName === 'A') {
e.preventDefault();
}
//call the swap image function
if ($(this).data(self.options.attrImageZoomSrc)) {
self.zoomImagePre = $(this).data(self.options.attrImageZoomSrc);
}
else {
self.zoomImagePre = $(this).data('image');
}
self.swaptheimage($(this).data('image'), self.zoomImagePre);
if (this.tagName === 'A') {
return false;
}
});
function generateUUID() {
var d = new Date().getTime();
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (d + Math.random() * 16) % 16 | 0; // jshint ignore:line
d = Math.floor(d / 16); // jshint ignore:line
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); // jshint ignore:line
});
return uuid;
}
},
refresh: function (length) {
var self = this;
setTimeout(function () {
self.fetch(self.imageSrc, self.$elem, self.options.minZoomLevel);
}, length || self.options.refresh);
},
fetch: function (imgsrc, element, minZoom) {
//get the image
var self = this;
var newImg = new Image();
newImg.onload = function () {
//set the large image dimensions - used to calculte ratio's
if (newImg.width / element.width() <= minZoom) {
self.largeWidth = element.width() * minZoom;
} else {
self.largeWidth = newImg.width;
}
if (newImg.height / element.height() <= minZoom) {
self.largeHeight = element.height() * minZoom;
} else {
self.largeHeight = newImg.height;
}
//once image is loaded start the calls
self.startZoom();
self.currentImage = self.imageSrc;
//let caller know image has been loaded
self.options.onZoomedImageLoaded(self.$elem);
};
self.setImageSource(newImg, imgsrc); // this must be done AFTER setting onload
return;
},
setImageSource: function (image, src) {
//sets an image's source.
image.src = src;
},
startZoom: function () {
var self = this;
//get dimensions of the non zoomed image
self.nzWidth = self.$elem.width();
self.nzHeight = self.$elem.height();
//activated elements
self.isWindowActive = false;
self.isLensActive = false;
self.isTintActive = false;
self.overWindow = false;
//CrossFade Wrapper
if (self.options.imageCrossfade) {
var elementZoomWrapper = $('')
.css({
height: self.nzHeight,
width: self.nzWidth
});
if(self.$elem.parent().hasClass('zoomWrapper')){
self.$elem.unwrap();
}
self.zoomWrap = self.$elem.wrap(elementZoomWrapper);
self.$elem.css({
position: 'absolute'
});
}
self.zoomLock = 1;
self.scrollingLock = false;
self.changeBgSize = false;
self.currentZoomLevel = self.options.zoomLevel;
//get offset of the non zoomed image
self.updateOffset(self);
//calculate the width ratio of the large/small image
self.widthRatio = (self.largeWidth / self.currentZoomLevel) / self.nzWidth;
self.heightRatio = (self.largeHeight / self.currentZoomLevel) / self.nzHeight;
function getWindowZoomStyle() {
return {
display: 'none',
position: 'absolute',
height: self.options.zoomWindowHeight,
width: self.options.zoomWindowWidth,
border: '' + self.options.borderSize + 'px solid ' + self.options.borderColour,
backgroundSize: '' + (self.largeWidth / self.currentZoomLevel) + 'px ' + (self.largeHeight / self.currentZoomLevel) + 'px',
backgroundPosition: '0px 0px',
backgroundRepeat: 'no-repeat',
backgroundColor: '' + self.options.zoomWindowBgColour,
overflow: 'hidden',
zIndex: 100
};
}
//if window zoom
if (self.options.zoomType === 'window') {
self.zoomWindowStyle = getWindowZoomStyle();
}
function getInnerZoomStyle() {
//has a border been put on the image? Lets cater for this
var borderWidth = self.$elem.css('border-left-width');
if (self.options.scrollZoom)
self.zoomLens = $('');
return {
display: 'none',
position: 'absolute',
height: self.nzHeight,
width: self.nzWidth,
marginTop: borderWidth,
marginLeft: borderWidth,
border: '' + self.options.borderSize + 'px solid ' + self.options.borderColour,
backgroundPosition: '0px 0px',
backgroundRepeat: 'no-repeat',
cursor: self.options.cursor,
overflow: 'hidden',
zIndex: self.options.zIndex
};
}
//if inner zoom
if (self.options.zoomType === 'inner') {
self.zoomWindowStyle = getInnerZoomStyle();
}
function getWindowLensStyle() {
// adjust images less than the window height
if (self.nzHeight < self.options.zoomWindowHeight / self.heightRatio) {
self.lensHeight = self.nzHeight;
}
else {
self.lensHeight = self.options.zoomWindowHeight / self.heightRatio;
}
if (self.largeWidth < self.options.zoomWindowWidth) {
self.lensWidth = self.nzWidth;
}
else {
self.lensWidth = self.options.zoomWindowWidth / self.widthRatio;
}
return {
display: 'none',
position: 'absolute',
height: self.lensHeight,
width: self.lensWidth,
border: '' + self.options.lensBorderSize + 'px' + ' solid ' + self.options.lensBorderColour,
backgroundPosition: '0px 0px',
backgroundRepeat: 'no-repeat',
backgroundColor: self.options.lensColour,
opacity: self.options.lensOpacity,
cursor: self.options.cursor,
zIndex: 999,
overflow: 'hidden'
};
}
//lens style for window zoom
if (self.options.zoomType === 'window') {
self.lensStyle = getWindowLensStyle();
}
//tint style
self.tintStyle = {
display: 'block',
position: 'absolute',
height: self.nzHeight,
width: self.nzWidth,
backgroundColor: self.options.tintColour,
opacity: 0
};
//lens style for lens zoom with optional round for modern browsers
self.lensRound = {};
if (self.options.zoomType === 'lens') {
self.lensStyle = {
display: 'none',
position: 'absolute',
float: 'left',
height: self.options.lensSize,
width: self.options.lensSize,
border: '' + self.options.borderSize + 'px solid ' + self.options.borderColour,
backgroundPosition: '0px 0px',
backgroundRepeat: 'no-repeat',
backgroundColor: self.options.lensColour,
cursor: self.options.cursor
};
}
//does not round in all browsers
if (self.options.lensShape === 'round') {
self.lensRound = {
borderRadius: self.options.lensSize / 2 + self.options.borderSize
};
}
//create the div's + ""
//self.zoomContainer = $('').addClass('zoomContainer').css({"position":"relative", "height":self.nzHeight, "width":self.nzWidth});
self.zoomContainer = $('');
self.zoomContainer.css({
position: 'absolute',
top: self.nzOffset.top,
left: self.nzOffset.left,
height: self.nzHeight,
width: self.nzWidth,
zIndex: self.options.zIndex
});
if (self.$elem.attr('id')) {
self.zoomContainer.attr('id', self.$elem.attr('id') + '-' + self.options.container);
}
$('.' + self.options.container).remove();
$(self.options.zoomContainerAppendTo).append(self.zoomContainer);
//this will add overflow hidden and contrain the lens on lens mode
if (self.options.containLensZoom && self.options.zoomType === 'lens') {
self.zoomContainer.css('overflow', 'hidden');
}
if (self.options.zoomType !== 'inner') {
self.zoomLens = $('')
.css($.extend({}, self.lensStyle, self.lensRound))
.appendTo(self.zoomContainer)
.click(function () {
self.$elem.trigger('click');
});
if (self.options.tint) {
self.tintContainer = $('');
self.zoomTint = $('').css(self.tintStyle);
self.zoomLens.wrap(self.tintContainer);
self.zoomTintcss = self.zoomLens.after(self.zoomTint);
//if tint enabled - set an image to show over the tint
self.zoomTintImage = $('')
.css({
position: 'absolute',
top: 0,
left: 0,
height: self.nzHeight,
width: self.nzWidth,
maxWidth: 'none'
})
.appendTo(self.zoomLens)
.click(function () {
self.$elem.trigger('click');
});
}
}
//create zoom window
var targetZoomContainer = isNaN(self.options.zoomWindowPosition) ? 'body' : self.zoomContainer;
self.zoomWindow = $('')
.css($.extend({
zIndex: 999,
top: self.windowOffsetTop,
left: self.windowOffsetLeft,
}, self.zoomWindowStyle))
.appendTo(targetZoomContainer).click(function () {
self.$elem.trigger('click');
});
self.zoomWindowContainer = $('')
.css({
width: self.options.zoomWindowWidth
});
self.zoomWindow.wrap(self.zoomWindowContainer);
if (self.options.zoomType === 'lens') {
self.zoomContainer.css('display', 'none');
self.zoomLens.css({
backgroundImage: 'url("' + self.imageSrc + '")'
});
}
if (self.options.zoomType === 'window') {
self.zoomWindow.css({
backgroundImage: 'url("' + self.imageSrc + '")'
});
}
if (self.options.zoomType === 'inner') {
self.zoomWindow.css({
backgroundImage: 'url("' + self.imageSrc + '")'
});
}
/*-------------------END THE ZOOM WINDOW AND LENS----------------------------------*/
if (self.options.touchEnabled) {
//touch events
self.$elem.on('touchmove.ezpspace', function (e) {
e.preventDefault();
var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
self.setPosition(touch);
});
self.zoomContainer.on('touchmove.ezpspace', function (e) {
self.setElements('show');
e.preventDefault();
var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
self.setPosition(touch);
});
self.zoomContainer
.add(self.$elem)
.on('touchend.ezpspace', function (e) {
self.showHideWindow('hide');
if (self.options.showLens) {
self.showHideLens('hide');
}
if (self.options.tint && self.options.zoomType !== 'inner') {
self.showHideTint('hide');
}
});
if (self.options.showLens) {
self.zoomLens.on('touchmove.ezpspace', function (e) {
e.preventDefault();
var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
self.setPosition(touch);
});
self.zoomLens.on('touchend.ezpspace', function (e) {
self.showHideWindow('hide');
if (self.options.showLens) {
self.showHideLens('hide');
}
if (self.options.tint && self.options.zoomType !== 'inner') {
self.showHideTint('hide');
}
});
}
}
// Needed to work in IE
self.zoomContainer.on('click.ezpspace touchstart.ezpspace', self.options.onImageClick);
self.zoomContainer
.add(self.$elem)
.on('mousemove.ezpspace', function (e) {
if (self.overWindow === false) {
self.setElements('show');
}
mouseMoveZoomHandler(e);
});
function mouseMoveZoomHandler(e) {
//self.overWindow = true;
//make sure on orientation change the setposition is not fired
if (self.lastX !== e.clientX || self.lastY !== e.clientY) {
self.setPosition(e);
self.currentLoc = e;
}
self.lastX = e.clientX;
self.lastY = e.clientY;
}
var elementToTrack = null;
if (self.options.zoomType !== 'inner') {
elementToTrack = self.zoomLens;
}
if (self.options.tint && self.options.zoomType !== 'inner') {
elementToTrack = self.zoomTint;
}
if (self.options.zoomType === 'inner') {
elementToTrack = self.zoomWindow;
}
//register the mouse tracking
if (elementToTrack) {
elementToTrack.on('mousemove.ezpspace', mouseMoveZoomHandler);
}
// lensFadeOut: 500, zoomTintFadeIn
self.zoomContainer
.add(self.$elem)
.hover(function () {
if (self.overWindow === false) {
self.setElements('show');
}
}, function () {
if (!self.scrollLock) {
self.setElements('hide');
self.options.onDestroy(self.$elem);
}
});
//end ove image
if (self.options.zoomType !== 'inner') {
self.zoomWindow.hover(function () {
self.overWindow = true;
self.setElements('hide');
}, function () {
self.overWindow = false;
});
}
//end ove image
// var delta = parseInt(e.originalEvent.wheelDelta || -e.originalEvent.detail);
// $(this).empty();
// return false;
//fix for initial zoom setting
//if (self.options.zoomLevel !== 1) {
// self.changeZoomLevel(self.currentZoomLevel);
//}
//set the min zoomlevel
if (self.options.minZoomLevel) {
self.minZoomLevel = self.options.minZoomLevel;
}
else {
self.minZoomLevel = self.options.scrollZoomIncrement * 2;
}
if (self.options.scrollZoom) {
//see compatibility of mouse events at https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel
self.zoomContainer.add(self.$elem).on('wheel DOMMouseScroll MozMousePixelScroll', function (e) {
// in IE there is issue with firing of mouseleave - So check whether still scrolling
// and on mouseleave check if scrolllock
self.scrollLock = true;
clearTimeout($.data(this, 'timer'));
$.data(this, 'timer', setTimeout(function () {
self.scrollLock = false;
//do something
}, 250));
var theEvent = e.originalEvent.deltaY || e.originalEvent.detail * -1;
//this.scrollTop += ( delta < 0 ? 1 : -1 ) * 30;
// e.preventDefault();
e.stopImmediatePropagation();
e.stopPropagation();
e.preventDefault();
if (theEvent === 0) {
// fixes last event inversion bug
return false;
}
var nextZoomLevel;
if (theEvent / 120 > 0) {
nextZoomLevel = parseFloat(self.currentZoomLevel) - self.options.scrollZoomIncrement;
//scrolling up
if (nextZoomLevel >= parseFloat(self.minZoomLevel)) {
self.changeZoomLevel(nextZoomLevel);
}
}
else {
//scrolling down
//Check if it has to maintain original zoom window aspect ratio or not
if ((!self.fullheight && !self.fullwidth) || !self.options.mantainZoomAspectRatio) {
nextZoomLevel = parseFloat(self.currentZoomLevel) + self.options.scrollZoomIncrement;
if (self.options.maxZoomLevel) {
if (nextZoomLevel <= self.options.maxZoomLevel) {
self.changeZoomLevel(nextZoomLevel);
}
}
else {
//andy
self.changeZoomLevel(nextZoomLevel);
}
}
}
return false;
});
}
},
destroy: function () {
var self = this;
self.$elem.off('.ezpspace');
self.$galleries.off('.ezpspace');
$(self.zoomContainer).remove();
if (self.options.loadingIcon && !!self.spinner && !!self.spinner.length) {
self.spinner.remove();
delete self.spinner;
}
},
getIdentifier: function () {
var self = this;
return self.options.zoomId;
},
setElements: function (type) {
var self = this;
if (!self.options.zoomEnabled) {
return false;
}
if (type === 'show') {
if (self.isWindowSet) {
if (self.options.zoomType === 'inner') {
self.showHideWindow('show');
}
if (self.options.zoomType === 'window') {
self.showHideWindow('show');
}
if (self.options.showLens) {
self.showHideZoomContainer('show');
self.showHideLens('show');
}
if (self.options.tint && self.options.zoomType !== 'inner') {
self.showHideTint('show');
}
}
}
if (type === 'hide') {
if (self.options.zoomType === 'window') {
self.showHideWindow('hide');
}
if (!self.options.tint) {
self.showHideWindow('hide');
}
if (self.options.showLens) {
self.showHideZoomContainer('hide');
self.showHideLens('hide');
}
if (self.options.tint) {
self.showHideTint('hide');
}
}
},
setPosition: function (e) {
var self = this;
if (!self.options.zoomEnabled || e === undefined) {
return false;
}
//recaclc offset each time in case the image moves
//this can be caused by other on page elements
self.nzHeight = self.$elem.height();
self.nzWidth = self.$elem.width();
self.updateOffset(self);
if (self.options.tint && self.options.zoomType !== 'inner') {
self.zoomTint.css({
top: 0,
left: 0
});
}
//set responsive
//will checking if the image needs changing before running this code work faster?
if (self.options.responsive && !self.options.scrollZoom) {
if (self.options.showLens) {
var lensHeight, lensWidth;
if (self.nzHeight < self.options.zoomWindowWidth / self.widthRatio) {
self.lensHeight = self.nzHeight;
}
else {
self.lensHeight = self.options.zoomWindowHeight / self.heightRatio;
}
if (self.largeWidth < self.options.zoomWindowWidth) {
self.lensWidth = self.nzWidth;
}
else {
self.lensWidth = (self.options.zoomWindowWidth / self.widthRatio);
}
self.widthRatio = self.largeWidth / self.nzWidth;
self.heightRatio = self.largeHeight / self.nzHeight;
if (self.options.zoomType !== 'lens') {
//possibly dont need to keep recalcalculating
//if the lens is heigher than the image, then set lens size to image size
if (self.nzHeight < self.options.zoomWindowWidth / self.widthRatio) {
self.lensHeight = self.nzHeight;
}
else {
self.lensHeight = self.options.zoomWindowHeight / self.heightRatio;
}
if (self.nzWidth < self.options.zoomWindowHeight / self.heightRatio) {
self.lensWidth = self.nzWidth;
}
else {
self.lensWidth = self.options.zoomWindowWidth / self.widthRatio;
}
self.zoomLens.css({
width: self.lensWidth,
height: self.lensHeight
});
if (self.options.tint) {
self.zoomTintImage.css({
width: self.nzWidth,
height: self.nzHeight
});
}
}
if (self.options.zoomType === 'lens') {
self.zoomLens.css({
width: self.options.lensSize,
height: self.options.lensSize
});
}
//end responsive image change
}
}
//container fix
self.zoomContainer.css({
top: self.nzOffset.top,
left: self.nzOffset.left,
width: self.nzWidth, // new code
height: self.nzHeight // new code
});
self.mouseLeft = parseInt(e.pageX - self.pageOffsetX - self.nzOffset.left);
self.mouseTop = parseInt(e.pageY - self.pageOffsetY - self.nzOffset.top);
//calculate the Location of the Lens
//calculate the bound regions - but only if zoom window
if (self.options.zoomType === 'window') {
var zoomLensHeight = self.zoomLens.height() / 2;
var zoomLensWidth = self.zoomLens.width() / 2;
self.Etoppos = (self.mouseTop < 0 + zoomLensHeight);
self.Eboppos = (self.mouseTop > self.nzHeight - zoomLensHeight - (self.options.lensBorderSize * 2));
self.Eloppos = (self.mouseLeft < 0 + zoomLensWidth);
self.Eroppos = (self.mouseLeft > (self.nzWidth - zoomLensWidth - (self.options.lensBorderSize * 2)));
}
//calculate the bound regions - but only for inner zoom
if (self.options.zoomType === 'inner') {
self.Etoppos = (self.mouseTop < ((self.nzHeight / 2) / self.heightRatio));
self.Eboppos = (self.mouseTop > (self.nzHeight - ((self.nzHeight / 2) / self.heightRatio)));
self.Eloppos = (self.mouseLeft < 0 + (((self.nzWidth / 2) / self.widthRatio)));
self.Eroppos = (self.mouseLeft > (self.nzWidth - (self.nzWidth / 2) / self.widthRatio - (self.options.lensBorderSize * 2)));
}
// if the mouse position of the slider is one of the outerbounds, then hide window and lens
if (self.mouseLeft < 0 || self.mouseTop < 0 || self.mouseLeft > self.nzWidth || self.mouseTop > self.nzHeight) {
self.setElements('hide');
return;
}
//else continue with operations
else {
//lens options
if (self.options.showLens) {
// self.showHideLens('show');
//set background position of lens
self.lensLeftPos = Math.floor(self.mouseLeft - self.zoomLens.width() / 2);
self.lensTopPos = Math.floor(self.mouseTop - self.zoomLens.height() / 2);
}
//adjust the background position if the mouse is in one of the outer regions
//Top region
if (self.Etoppos) {
self.lensTopPos = 0;
}
//Left Region
if (self.Eloppos) {
self.windowLeftPos = 0;
self.lensLeftPos = 0;
self.tintpos = 0;
}
//Set bottom and right region for window mode
if (self.options.zoomType === 'window') {
if (self.Eboppos) {
self.lensTopPos = Math.max((self.nzHeight) - self.zoomLens.height() - (self.options.lensBorderSize * 2), 0);
}
if (self.Eroppos) {
self.lensLeftPos = (self.nzWidth - (self.zoomLens.width()) - (self.options.lensBorderSize * 2));
}
}
//Set bottom and right region for inner mode
if (self.options.zoomType === 'inner') {
if (self.Eboppos) {
self.lensTopPos = Math.max(((self.nzHeight) - (self.options.lensBorderSize * 2)), 0);
}
if (self.Eroppos) {
self.lensLeftPos = (self.nzWidth - (self.nzWidth) - (self.options.lensBorderSize * 2));
}
}
//if lens zoom
if (self.options.zoomType === 'lens') {
self.windowLeftPos = ((e.pageX - self.pageOffsetX - self.nzOffset.left) * self.widthRatio - self.zoomLens.width() / 2) * -1;
self.windowTopPos = ((e.pageY - self.pageOffsetY - self.nzOffset.top) * self.heightRatio - self.zoomLens.height() / 2) * -1;
self.zoomLens.css({
backgroundPosition: '' + self.windowLeftPos + 'px ' + self.windowTopPos + 'px'
});
if (self.changeBgSize) {
if (self.nzHeight > self.nzWidth) {
if (self.options.zoomType === 'lens') {
self.zoomLens.css({
backgroundSize: '' +
(self.largeWidth / self.newvalueheight) + 'px ' +
(self.largeHeight / self.newvalueheight) + 'px'
});
}
self.zoomWindow.css({
backgroundSize: '' +
(self.largeWidth / self.newvalueheight) + 'px ' +
(self.largeHeight / self.newvalueheight) + 'px'
});
}
else {
if (self.options.zoomType === 'lens') {
self.zoomLens.css({
backgroundSize: '' +
(self.largeWidth / self.newvaluewidth) + 'px ' +
(self.largeHeight / self.newvaluewidth) + 'px'
});
}
self.zoomWindow.css({
backgroundSize: '' +
(self.largeWidth / self.newvaluewidth) + 'px ' +
(self.largeHeight / self.newvaluewidth) + 'px'
});
}
self.changeBgSize = false;
}
self.setWindowPosition(e);
}
//if tint zoom
if (self.options.tint && self.options.zoomType !== 'inner') {
self.setTintPosition(e);
}
//set the css background position
if (self.options.zoomType === 'window') {
self.setWindowPosition(e);
}
if (self.options.zoomType === 'inner') {
self.setWindowPosition(e);
}
if (self.options.showLens) {
if (self.fullwidth && self.options.zoomType !== 'lens') {
self.lensLeftPos = 0;
}
self.zoomLens.css({
left: self.lensLeftPos,
top: self.lensTopPos
});
}
} //end else
},
showHideZoomContainer: function (change) {
var self = this;
if (change === 'show') {
if (self.zoomContainer) {
self.zoomContainer.show();
}
}
if (change === 'hide') {
if (self.zoomContainer) {
self.zoomContainer.hide();
}
}
},
showHideWindow: function (change) {
var self = this;
if (change === 'show') {
if (!self.isWindowActive && self.zoomWindow) {
self.options.onShow(self);
if (self.options.zoomWindowFadeIn) {
self.zoomWindow.stop(true, true, false).fadeIn(self.options.zoomWindowFadeIn);
}
else {
self.zoomWindow.show();
}
self.isWindowActive = true;
}
}
if (change === 'hide') {
if (self.isWindowActive) {
if (self.options.zoomWindowFadeOut) {
self.zoomWindow.stop(true, true).fadeOut(self.options.zoomWindowFadeOut, function () {
if (self.loop) {
//stop moving the zoom window when zoom window is faded out
clearInterval(self.loop);
self.loop = false;
}
});
}
else {
self.zoomWindow.hide();
}
self.options.onHide(self);
self.isWindowActive = false;
}
}
},
showHideLens: function (change) {
var self = this;
if (change === 'show') {
if (!self.isLensActive) {
if (self.zoomLens) {
if (self.options.lensFadeIn) {
self.zoomLens.stop(true, true, false).fadeIn(self.options.lensFadeIn);
}
else {
self.zoomLens.show();
}
}
self.isLensActive = true;
}
}
if (change === 'hide') {
if (self.isLensActive) {
if (self.zoomLens) {
if (self.options.lensFadeOut) {
self.zoomLens.stop(true, true).fadeOut(self.options.lensFadeOut);
}
else {
self.zoomLens.hide();
}
}
self.isLensActive = false;
}
}
},
showHideTint: function (change) {
var self = this;
if (change === 'show') {
if (!self.isTintActive && self.zoomTint) {
if (self.options.zoomTintFadeIn) {
self.zoomTint.css('opacity', self.options.tintOpacity).animate().stop(true, true).fadeIn('slow');
}
else {
self.zoomTint.css('opacity', self.options.tintOpacity).animate();
self.zoomTint.show();
}
self.isTintActive = true;
}
}
if (change === 'hide') {
if (self.isTintActive) {
if (self.options.zoomTintFadeOut) {
self.zoomTint.stop(true, true).fadeOut(self.options.zoomTintFadeOut);
}
else {
self.zoomTint.hide();
}
self.isTintActive = false;
}
}
},
setLensPosition: function (e) {
},
setWindowPosition: function (e) {
//return obj.slice( 0, count );
var self = this;
if (!isNaN(self.options.zoomWindowPosition)) {
switch (self.options.zoomWindowPosition) {
case 1: //done
self.windowOffsetTop = (self.options.zoomWindowOffsetY);//DONE - 1
self.windowOffsetLeft = (+self.nzWidth); //DONE 1, 2, 3, 4, 16
break;
case 2:
if (self.options.zoomWindowHeight > self.nzHeight) { //positive margin
self.windowOffsetTop = ((self.options.zoomWindowHeight / 2) - (self.nzHeight / 2)) * (-1);
self.windowOffsetLeft = (self.nzWidth); //DONE 1, 2, 3, 4, 16
}
else { //negative margin
$.noop();
}
break;
case 3: //done
self.windowOffsetTop = (self.nzHeight - self.zoomWindow.height() - (self.options.borderSize * 2)); //DONE 3,9
self.windowOffsetLeft = (self.nzWidth); //DONE 1, 2, 3, 4, 16
break;
case 4: //done
self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8
self.windowOffsetLeft = (self.nzWidth); //DONE 1, 2, 3, 4, 16
break;
case 5: //done
self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8
self.windowOffsetLeft = (self.nzWidth - self.zoomWindow.width() - (self.options.borderSize * 2)); //DONE - 5,15
break;
case 6:
if (self.options.zoomWindowHeight > self.nzHeight) { //positive margin
self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8
self.windowOffsetLeft = ((self.options.zoomWindowWidth / 2) - (self.nzWidth / 2) + (self.options.borderSize * 2)) * (-1);
}
else { //negative margin
$.noop();
}
break;
case 7: //done
self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8
self.windowOffsetLeft = 0; //DONE 7, 13
break;
case 8: //done
self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8
self.windowOffsetLeft = (self.zoomWindow.width() + (self.options.borderSize * 2)) * (-1); //DONE 8,9,10,11,12
break;
case 9: //done
self.windowOffsetTop = (self.nzHeight - self.zoomWindow.height() - (self.options.borderSize * 2)); //DONE 3,9
self.windowOffsetLeft = (self.zoomWindow.width() + (self.options.borderSize * 2)) * (-1); //DONE 8,9,10,11,12
break;
case 10:
if (self.options.zoomWindowHeight > self.nzHeight) { //positive margin
self.windowOffsetTop = ((self.options.zoomWindowHeight / 2) - (self.nzHeight / 2)) * (-1);
self.windowOffsetLeft = (self.zoomWindow.width() + (self.options.borderSize * 2)) * (-1); //DONE 8,9,10,11,12
}
else { //negative margin
$.noop();
}
break;
case 11:
self.windowOffsetTop = (self.options.zoomWindowOffsetY);
self.windowOffsetLeft = (self.zoomWindow.width() + (self.options.borderSize * 2)) * (-1); //DONE 8,9,10,11,12
break;
case 12: //done
self.windowOffsetTop = (self.zoomWindow.height() + (self.options.borderSize * 2)) * (-1); //DONE 12,13,14,15,16
self.windowOffsetLeft = (self.zoomWindow.width() + (self.options.borderSize * 2)) * (-1); //DONE 8,9,10,11,12
break;
case 13: //done
self.windowOffsetTop = (self.zoomWindow.height() + (self.options.borderSize * 2)) * (-1); //DONE 12,13,14,15,16
self.windowOffsetLeft = (0); //DONE 7, 13
break;
case 14:
if (self.options.zoomWindowHeight > self.nzHeight) { //positive margin
self.windowOffsetTop = (self.zoomWindow.height() + (self.options.borderSize * 2)) * (-1); //DONE 12,13,14,15,16
self.windowOffsetLeft = ((self.options.zoomWindowWidth / 2) - (self.nzWidth / 2) + (self.options.borderSize * 2)) * (-1);
}
else { //negative margin
$.noop();
}
break;
case 15://done
self.windowOffsetTop = (self.zoomWindow.height() + (self.options.borderSize * 2)) * (-1); //DONE 12,13,14,15,16
self.windowOffsetLeft = (self.nzWidth - self.zoomWindow.width() - (self.options.borderSize * 2)); //DONE - 5,15
break;
case 16: //done
self.windowOffsetTop = (self.zoomWindow.height() + (self.options.borderSize * 2)) * (-1); //DONE 12,13,14,15,16
self.windowOffsetLeft = (self.nzWidth); //DONE 1, 2, 3, 4, 16
break;
default: //done
self.windowOffsetTop = (self.options.zoomWindowOffsetY);//DONE - 1
self.windowOffsetLeft = (self.nzWidth); //DONE 1, 2, 3, 4, 16
}
} //end isNAN
else {
// For BC purposes, treat passed element as ID if element not found
self.externalContainer = $(self.options.zoomWindowPosition);
if (!self.externalContainer.length) {
self.externalContainer = $('#' + self.options.zoomWindowPosition);
}
self.externalContainerWidth = self.externalContainer.width();
self.externalContainerHeight = self.externalContainer.height();
self.externalContainerOffset = self.externalContainer.offset();
self.windowOffsetTop = self.externalContainerOffset.top;//DONE - 1
self.windowOffsetLeft = self.externalContainerOffset.left; //DONE 1, 2, 3, 4, 16
}
self.isWindowSet = true;
self.windowOffsetTop = self.windowOffsetTop + self.options.zoomWindowOffsetY;
self.windowOffsetLeft = self.windowOffsetLeft + self.options.zoomWindowOffsetX;
self.zoomWindow.css({
top: self.windowOffsetTop,
left: self.windowOffsetLeft
});
if (self.options.zoomType === 'inner') {
self.zoomWindow.css({
top: 0,
left: 0
});
}
self.windowLeftPos = ((e.pageX - self.pageOffsetX - self.nzOffset.left) * self.widthRatio - self.zoomWindow.width() / 2) * -1;
self.windowTopPos = ((e.pageY - self.pageOffsetY - self.nzOffset.top) * self.heightRatio - self.zoomWindow.height() / 2) * -1;
if (self.Etoppos) {
self.windowTopPos = 0;
}
if (self.Eloppos) {
self.windowLeftPos = 0;
}
if (self.Eboppos) {
self.windowTopPos = (self.largeHeight / self.currentZoomLevel - self.zoomWindow.height()) * (-1);
}
if (self.Eroppos) {
self.windowLeftPos = ((self.largeWidth / self.currentZoomLevel - self.zoomWindow.width()) * (-1));
}
//stops micro movements
if (self.fullheight) {
self.windowTopPos = 0;
}
if (self.fullwidth) {
self.windowLeftPos = 0;
}
//set the css background position
if (self.options.zoomType === 'window' || self.options.zoomType === 'inner') {
if (self.zoomLock === 1) {
//overrides for images not zoomable
if (self.widthRatio <= 1) {
self.windowLeftPos = 0;
}
if (self.heightRatio <= 1) {
self.windowTopPos = 0;
}
}
// adjust images less than the window height
if (self.options.zoomType === 'window') {
if (self.largeHeight < self.options.zoomWindowHeight) {
self.windowTopPos = 0;
}
if (self.largeWidth < self.options.zoomWindowWidth) {
self.windowLeftPos = 0;
}
}
//set the zoomwindow background position
if (self.options.easing) {
// if(self.changeZoom){
// clearInterval(self.loop);
// self.changeZoom = false;
// self.loop = false;
// }
//set the pos to 0 if not set
if (!self.xp) {
self.xp = 0;
}
if (!self.yp) {
self.yp = 0;
}
var interval = 16;
var easingInterval = parseInt(self.options.easing);
if (typeof easingInterval === 'number' && isFinite(easingInterval) && Math.floor(easingInterval) === easingInterval) {
interval = easingInterval;
}
//if loop not already started, then run it
if (!self.loop) {
self.loop = setInterval(function () {
//using zeno's paradox
self.xp += (self.windowLeftPos - self.xp) / self.options.easingAmount;
self.yp += (self.windowTopPos - self.yp) / self.options.easingAmount;
if (self.scrollingLock) {
clearInterval(self.loop);
self.xp = self.windowLeftPos;
self.yp = self.windowTopPos;
self.xp = ((e.pageX - self.pageOffsetX - self.nzOffset.left) * self.widthRatio - self.zoomWindow.width() / 2) * (-1);
self.yp = (((e.pageY - self.pageOffsetY - self.nzOffset.top) * self.heightRatio - self.zoomWindow.height() / 2) * (-1));
if (self.changeBgSize) {
if (self.nzHeight > self.nzWidth) {
if (self.options.zoomType === 'lens') {
self.zoomLens.css({
backgroundSize: '' +
(self.largeWidth / self.newvalueheight) + 'px ' +
(self.largeHeight / self.newvalueheight) + 'px'
});
}
self.zoomWindow.css({
backgroundSize: '' +
(self.largeWidth / self.newvalueheight) + 'px ' +
(self.largeHeight / self.newvalueheight) + 'px'
});
}
else {
if (self.options.zoomType !== 'lens') {
self.zoomLens.css({
backgroundSize: '' +
(self.largeWidth / self.newvaluewidth) + 'px ' +
(self.largeHeight / self.newvalueheight) + 'px'
});
}
self.zoomWindow.css({
backgroundSize: '' +
(self.largeWidth / self.newvaluewidth) + 'px ' +
(self.largeHeight / self.newvaluewidth) + 'px'
});
}
/*
if(!self.bgxp){self.bgxp = self.largeWidth/self.newvalue;}
if(!self.bgyp){self.bgyp = self.largeHeight/self.newvalue ;}
if (!self.bgloop){
self.bgloop = setInterval(function(){
self.bgxp += (self.largeWidth/self.newvalue - self.bgxp) / self.options.easingAmount;
self.bgyp += (self.largeHeight/self.newvalue - self.bgyp) / self.options.easingAmount;
self.zoomWindow.css('background-size', self.bgxp + 'px ' + self.bgyp + 'px' );
}, 16);
}
*/
self.changeBgSize = false;
}
self.zoomWindow.css({
backgroundPosition: '' + self.windowLeftPos + 'px ' + self.windowTopPos + 'px'
});
self.scrollingLock = false;
self.loop = false;
}
else if (Math.round(Math.abs(self.xp - self.windowLeftPos) + Math.abs(self.yp - self.windowTopPos)) < 1) {
//stops micro movements
clearInterval(self.loop);
self.zoomWindow.css({
backgroundPosition: '' + self.windowLeftPos + 'px ' + self.windowTopPos + 'px'
});
self.loop = false;
}
else {
if (self.changeBgSize) {
if (self.nzHeight > self.nzWidth) {
if (self.options.zoomType === 'lens') {
self.zoomLens.css({
backgroundSize: '' +
(self.largeWidth / self.newvalueheight) + 'px ' +
(self.largeHeight / self.newvalueheight) + 'px'
});
}
self.zoomWindow.css({
backgroundSize: '' +
(self.largeWidth / self.newvalueheight) + 'px ' +
(self.largeHeight / self.newvalueheight) + 'px'
});
}
else {
if (self.options.zoomType !== 'lens') {
self.zoomLens.css({
backgroundSize: '' +
(self.largeWidth / self.newvaluewidth) + 'px ' +
(self.largeHeight / self.newvaluewidth) + 'px'
});
}
self.zoomWindow.css({
backgroundSize: '' +
(self.largeWidth / self.newvaluewidth) + 'px ' +
(self.largeHeight / self.newvaluewidth) + 'px'
});
}
self.changeBgSize = false;
}
self.zoomWindow.css({
backgroundPosition: '' + self.xp + 'px ' + self.yp + 'px'
});
}
}, interval);
}
}
else {
if (self.changeBgSize) {
if (self.nzHeight > self.nzWidth) {
if (self.options.zoomType === 'lens') {
self.zoomLens.css({
backgroundSize: '' +
(self.largeWidth / self.newvalueheight) + 'px ' +
(self.largeHeight / self.newvalueheight) + 'px'
});
}
self.zoomWindow.css({
backgroundSize: '' +
(self.largeWidth / self.newvalueheight) + 'px ' +
(self.largeHeight / self.newvalueheight) + 'px'
});
}
else {
if (self.options.zoomType === 'lens') {
self.zoomLens.css({
backgroundSize: '' +
(self.largeWidth / self.newvaluewidth) + 'px ' +
(self.largeHeight / self.newvaluewidth) + 'px'
});
}
if ((self.largeHeight / self.newvaluewidth) < self.options.zoomWindowHeight) {
self.zoomWindow.css({
backgroundSize: '' +
(self.largeWidth / self.newvaluewidth) + 'px ' +
(self.largeHeight / self.newvaluewidth) + 'px'
});
}
else {
self.zoomWindow.css({
backgroundSize: '' +
(self.largeWidth / self.newvalueheight) + 'px ' +
(self.largeHeight / self.newvalueheight) + 'px'
});
}
}
self.changeBgSize = false;
}
self.zoomWindow.css({
backgroundPosition: '' +
self.windowLeftPos + 'px ' +
self.windowTopPos + 'px'
});
}
}
},
setTintPosition: function (e) {
var self = this;
var zoomLensWidth = self.zoomLens.width();
var zoomLensHeight = self.zoomLens.height();
self.updateOffset(self);
self.tintpos = ((e.pageX - self.pageOffsetX - self.nzOffset.left) - (zoomLensWidth / 2)) * -1;
self.tintposy = ((e.pageY - self.pageOffsetY - self.nzOffset.top) - zoomLensHeight / 2) * -1;
if (self.Etoppos) {
self.tintposy = 0;
}
if (self.Eloppos) {
self.tintpos = 0;
}
if (self.Eboppos) {
self.tintposy = (self.nzHeight - zoomLensHeight - (self.options.lensBorderSize * 2)) * (-1);
}
if (self.Eroppos) {
self.tintpos = ((self.nzWidth - zoomLensWidth - (self.options.lensBorderSize * 2)) * (-1));
}
if (self.options.tint) {
//stops micro movements
if (self.fullheight) {
self.tintposy = 0;
}
if (self.fullwidth) {
self.tintpos = 0;
}
self.zoomTintImage.css({
left: self.tintpos,
top: self.tintposy
});
}
},
swaptheimage: function (smallimage, largeimage) {
var self = this;
var newImg = new Image();
if (self.options.loadingIcon && !self.spinner) {
var styleAttr = {
background: 'url("' + self.options.loadingIcon + '") no-repeat',
height: self.nzHeight,
width: self.nzWidth,
zIndex: 2000,
position: 'absolute',
backgroundPosition: 'center center',
};
if (self.options.zoomType === 'inner') {
styleAttr.setProperty('top', 0);
}
self.spinner = $('')
.css(styleAttr);
self.$elem.after(self.spinner);
} else if (self.spinner) {
self.spinner.show();
}
self.options.onImageSwap(self.$elem);
newImg.onload = function () {
self.largeWidth = newImg.width;
self.largeHeight = newImg.height;
self.zoomImage = largeimage;
self.zoomWindow.css({
backgroundSize: '' + self.largeWidth + 'px ' + self.largeHeight + 'px'
});
self.swapAction(smallimage, largeimage);
return;
};
self.setImageSource(newImg, largeimage); // this must be done AFTER setting onload
},
swapAction: function (smallimage, largeimage) {
var self = this;
var elemWidth = self.$elem.width();
var elemHeight = self.$elem.height();
var newImg2 = new Image();
newImg2.onload = function () {
//re-calculate values
self.nzHeight = newImg2.height;
self.nzWidth = newImg2.width;
self.options.onImageSwapComplete(self.$elem);
self.doneCallback();
return;
};
self.setImageSource(newImg2, smallimage);
//reset the zoomlevel to that initially set in options
self.currentZoomLevel = self.options.zoomLevel;
self.options.maxZoomLevel = false;
//swaps the main image
//self.$elem.attr('src',smallimage);
//swaps the zoom image
if (self.options.zoomType === 'lens') {
self.zoomLens.css('background-image', 'url("' + largeimage + '")');
}
if (self.options.zoomType === 'window') {
self.zoomWindow.css('background-image', 'url("' + largeimage + '")');
}
if (self.options.zoomType === 'inner') {
self.zoomWindow.css('background-image', 'url("' + largeimage + '")');
}
self.currentImage = largeimage;
if (self.options.imageCrossfade) {
var oldImg = self.$elem;
var newImg = oldImg.clone();
self.$elem.attr('src', smallimage);
self.$elem.after(newImg);
newImg.stop(true).fadeOut(self.options.imageCrossfade, function () {
$(this).remove();
});
// if(self.options.zoomType === 'inner'){
//remove any attributes on the cloned image so we can resize later
self.$elem.width('auto').removeAttr('width');
self.$elem.height('auto').removeAttr('height');
// }
oldImg.fadeIn(self.options.imageCrossfade);
if (self.options.tint && self.options.zoomType !== 'inner') {
var oldImgTint = self.zoomTintImage;
var newImgTint = oldImgTint.clone();
self.zoomTintImage.attr('src', largeimage);
self.zoomTintImage.after(newImgTint);
newImgTint.stop(true).fadeOut(self.options.imageCrossfade, function () {
$(this).remove();
});
oldImgTint.fadeIn(self.options.imageCrossfade);
//self.zoomTintImage.attr('width',elem.data('image'));
//resize the tint window
self.zoomTint.css({
height: elemHeight,
width: elemWidth
});
}
self.zoomContainer.css({
'height': elemHeight,
'width': elemWidth
});
if (self.options.zoomType === 'inner') {
if (!self.options.constrainType) {
self.zoomWrap.parent().css({
'height': elemHeight,
'width': elemWidth
});
self.zoomWindow.css({
'height': elemHeight,
'width': elemWidth
});
}
}
if (self.options.imageCrossfade) {
self.zoomWrap.css({
'height': elemHeight,
'width': elemWidth
});
}
}
else {
self.$elem.attr('src', smallimage);
if (self.options.tint) {
self.zoomTintImage.attr('src', largeimage);
//self.zoomTintImage.attr('width',elem.data('image'));
self.zoomTintImage.attr('height', elemHeight);
//self.zoomTintImage.attr('src') = elem.data('image');
self.zoomTintImage.css('height', elemHeight);
self.zoomTint.css('height', elemHeight);
}
self.zoomContainer.css({
'height': elemHeight,
'width': elemWidth
});
if (self.options.imageCrossfade) {
self.zoomWrap.css({
'height': elemHeight,
'width': elemWidth
});
}
}
if (self.options.constrainType) {
//This will contrain the image proportions
if (self.options.constrainType === 'height') {
var autoWDimension = {
'height': self.options.constrainSize,
'width': 'auto'
};
self.zoomContainer.css(autoWDimension);
if (self.options.imageCrossfade) {
self.zoomWrap.css(autoWDimension);
self.constwidth = self.zoomWrap.width();
}
else {
self.$elem.css(autoWDimension);
self.constwidth = elemWidth;
}
var constWDim = {
'height': self.options.constrainSize,
'width': self.constwidth
};
if (self.options.zoomType === 'inner') {
self.zoomWrap.parent().css(constWDim);
self.zoomWindow.css(constWDim);
}
if (self.options.tint) {
self.tintContainer.css(constWDim);
self.zoomTint.css(constWDim);
self.zoomTintImage.css(constWDim);
}
}
if (self.options.constrainType === 'width') {
var autoHDimension = {
'height': 'auto',
'width': self.options.constrainSize
};
self.zoomContainer.css(autoHDimension);
if (self.options.imageCrossfade) {
self.zoomWrap.css(autoHDimension);
self.constheight = self.zoomWrap.height();
}
else {
self.$elem.css(autoHDimension);
self.constheight = elemHeight;
}
var constHDim = {
'height': self.constheight,
'width': self.options.constrainSize
};
if (self.options.zoomType === 'inner') {
self.zoomWrap.parent().css(constHDim);
self.zoomWindow.css(constHDim);
}
if (self.options.tint) {
self.tintContainer.css(constHDim);
self.zoomTint.css(constHDim);
self.zoomTintImage.css(constHDim);
}
}
}
},
doneCallback: function () {
var self = this;
if (self.options.loadingIcon && !!self.spinner && !!self.spinner.length) {
self.spinner.hide();
}
self.updateOffset(self);
self.nzWidth = self.$elem.width();
self.nzHeight = self.$elem.height();
// reset the zoomlevel back to default
self.currentZoomLevel = self.options.zoomLevel;
//ratio of the large to small image
self.widthRatio = self.largeWidth / self.nzWidth;
self.heightRatio = self.largeHeight / self.nzHeight;
//NEED TO ADD THE LENS SIZE FOR ROUND
// adjust images less than the window height
if (self.options.zoomType === 'window') {
if (self.nzHeight < self.options.zoomWindowHeight / self.heightRatio) {
self.lensHeight = self.nzHeight;
}
else {
self.lensHeight = self.options.zoomWindowHeight / self.heightRatio;
}
if (self.nzWidth < self.options.zoomWindowWidth) {
self.lensWidth = self.nzWidth;
}
else {
self.lensWidth = self.options.zoomWindowWidth / self.widthRatio;
}
if (self.zoomLens) {
self.zoomLens.css({
'width': self.lensWidth,
'height': self.lensHeight
});
}
}
},
getCurrentImage: function () {
var self = this;
return self.zoomImage;
},
getGalleryList: function () {
var self = this;
//loop through the gallery options and set them in list for fancybox
self.gallerylist = [];
if (self.options.gallery) {
$('#' + self.options.gallery + ' a').each(function () {
var imgSrc = '';
if ($(this).data(self.options.attrImageZoomSrc)) {
imgSrc = $(this).data(self.options.attrImageZoomSrc);
}
else if ($(this).data('image')) {
imgSrc = $(this).data('image');
}
//put the current image at the start
if (imgSrc === self.zoomImage) {
self.gallerylist.unshift({
href: '' + imgSrc + '',
title: $(this).find('img').attr('title')
});
}
else {
self.gallerylist.push({
href: '' + imgSrc + '',
title: $(this).find('img').attr('title')
});
}
});
}
//if no gallery - return current image
else {
self.gallerylist.push({
href: '' + self.zoomImage + '',
title: $(this).find('img').attr('title')
});
}
return self.gallerylist;
},
changeZoomLevel: function (value) {
var self = this;
//flag a zoom, so can adjust the easing during setPosition
self.scrollingLock = true;
//round to two decimal places
self.newvalue = parseFloat(value).toFixed(2);
var newvalue = self.newvalue;
//maxwidth & Maxheight of the image
var maxheightnewvalue = self.largeHeight / ((self.options.zoomWindowHeight / self.nzHeight) * self.nzHeight);
var maxwidthtnewvalue = self.largeWidth / ((self.options.zoomWindowWidth / self.nzWidth) * self.nzWidth);
//calculate new heightratio
if (self.options.zoomType !== 'inner') {
if (maxheightnewvalue <= newvalue) {
self.heightRatio = (self.largeHeight / maxheightnewvalue) / self.nzHeight;
self.newvalueheight = maxheightnewvalue;
self.fullheight = true;
}
else {
self.heightRatio = (self.largeHeight / newvalue) / self.nzHeight;
self.newvalueheight = newvalue;
self.fullheight = false;
}
// calculate new width ratio
if (maxwidthtnewvalue <= newvalue) {
self.widthRatio = (self.largeWidth / maxwidthtnewvalue) / self.nzWidth;
self.newvaluewidth = maxwidthtnewvalue;
self.fullwidth = true;
}
else {
self.widthRatio = (self.largeWidth / newvalue) / self.nzWidth;
self.newvaluewidth = newvalue;
self.fullwidth = false;
}
if (self.options.zoomType === 'lens') {
if (maxheightnewvalue <= newvalue) {
self.fullwidth = true;
self.newvaluewidth = maxheightnewvalue;
} else {
self.widthRatio = (self.largeWidth / newvalue) / self.nzWidth;
self.newvaluewidth = newvalue;
self.fullwidth = false;
}
}
}
if (self.options.zoomType === 'inner') {
maxheightnewvalue = parseFloat(self.largeHeight / self.nzHeight).toFixed(2);
maxwidthtnewvalue = parseFloat(self.largeWidth / self.nzWidth).toFixed(2);
if (newvalue > maxheightnewvalue) {
newvalue = maxheightnewvalue;
}
if (newvalue > maxwidthtnewvalue) {
newvalue = maxwidthtnewvalue;
}
if (maxheightnewvalue <= newvalue) {
self.heightRatio = (self.largeHeight / newvalue) / self.nzHeight;
if (newvalue > maxheightnewvalue) {
self.newvalueheight = maxheightnewvalue;
} else {
self.newvalueheight = newvalue;
}
self.fullheight = true;
}
else {
self.heightRatio = (self.largeHeight / newvalue) / self.nzHeight;
if (newvalue > maxheightnewvalue) {
self.newvalueheight = maxheightnewvalue;
} else {
self.newvalueheight = newvalue;
}
self.fullheight = false;
}
if (maxwidthtnewvalue <= newvalue) {
self.widthRatio = (self.largeWidth / newvalue) / self.nzWidth;
if (newvalue > maxwidthtnewvalue) {
self.newvaluewidth = maxwidthtnewvalue;
} else {
self.newvaluewidth = newvalue;
}
self.fullwidth = true;
}
else {
self.widthRatio = (self.largeWidth / newvalue) / self.nzWidth;
self.newvaluewidth = newvalue;
self.fullwidth = false;
}
} //end inner
var scrcontinue = false;
if (self.options.zoomType === 'inner') {
if (self.nzWidth >= self.nzHeight) {
if (self.newvaluewidth <= maxwidthtnewvalue) {
scrcontinue = true;
}
else {
scrcontinue = false;
self.fullheight = true;
self.fullwidth = true;
}
}
if (self.nzHeight > self.nzWidth) {
if (self.newvaluewidth <= maxwidthtnewvalue) {
scrcontinue = true;
}
else {
scrcontinue = false;
self.fullheight = true;
self.fullwidth = true;
}
}
}
if (self.options.zoomType !== 'inner') {
scrcontinue = true;
}
if (scrcontinue) {
self.zoomLock = 0;
self.changeZoom = true;
//if lens height is less than image height
if (((self.options.zoomWindowHeight) / self.heightRatio) <= self.nzHeight) {
self.currentZoomLevel = self.newvalueheight;
if (self.options.zoomType !== 'lens' && self.options.zoomType !== 'inner') {
self.changeBgSize = true;
self.zoomLens.css({
height: self.options.zoomWindowHeight / self.heightRatio
});
}
if (self.options.zoomType === 'lens' || self.options.zoomType === 'inner') {
self.changeBgSize = true;
}
}
if ((self.options.zoomWindowWidth / self.widthRatio) <= self.nzWidth) {
if (self.options.zoomType !== 'inner') {
if (self.newvaluewidth > self.newvalueheight) {
self.currentZoomLevel = self.newvaluewidth;
}
}
if (self.options.zoomType !== 'lens' && self.options.zoomType !== 'inner') {
self.changeBgSize = true;
self.zoomLens.css({
width: self.options.zoomWindowWidth / self.widthRatio
});
}
if (self.options.zoomType === 'lens' || self.options.zoomType === 'inner') {
self.changeBgSize = true;
}
}
if (self.options.zoomType === 'inner') {
self.changeBgSize = true;
if (self.nzWidth > self.nzHeight) {
self.currentZoomLevel = self.newvaluewidth;
}
else if (self.nzHeight >= self.nzWidth) {
self.currentZoomLevel = self.newvaluewidth;
}
}
} //under
//sets the boundry change, called in setWindowPos
self.setPosition(self.currentLoc);
//
},
closeAll: function () {
var self = this;
if (self.zoomWindow) {
self.zoomWindow.hide();
}
if (self.zoomLens) {
self.zoomLens.hide();
}
if (self.zoomTint) {
self.zoomTint.hide();
}
},
updateOffset: function (self) {
if (self.options.zoomContainerAppendTo !== 'body') {
self.nzOffset = self.$elem.offset();
var appendedPosition = $(self.options.zoomContainerAppendTo).offset();
self.nzOffset.top = self.$elem.offset().top - appendedPosition.top;
self.nzOffset.left = self.$elem.offset().left - appendedPosition.left;
// NOTE: When initialising ezPlus on an element
// present inside a dialog the positions will
// not be correct unless the dialog occupies the
// entire viewport. These page offsets will help
// zoom lens and zoom window to be positioned
// correctly
// Update page offsets
self.pageOffsetX = appendedPosition.left;
self.pageOffsetY = appendedPosition.top;
} else {
self.nzOffset = self.$elem.offset();
// Update page offsets
self.pageOffsetX = 0;
self.pageOffsetY = 0;
}
},
changeState: function (value) {
var self = this;
if (value === 'enable') {
self.options.zoomEnabled = true;
}
if (value === 'disable') {
self.options.zoomEnabled = false;
}
},
responsiveConfig: function (options) {
if (options.respond && options.respond.length > 0) {
return $.extend({}, options, this.configByScreenWidth(options));
}
return options;
},
configByScreenWidth: function (options) {
var screenWidth = $(window).width();
var config = $.grep(options.respond, function (item) {
var range = item.range.split('-');
return (screenWidth >= range[0]) && (screenWidth <= range[1]);
});
if (config.length > 0) {
return config[0];
} else {
return options;
}
}
};
$.fn.ezPlus = function (options) {
return this.each(function () {
var elevate = Object.create(EZP);
elevate.init(options, this);
$.data(this, 'ezPlus', elevate);
});
};
$.fn.ezPlus.options = {
container: 'ZoomContainer',
attrImageZoomSrc: 'zoom-image', // attribute to plugin use for zoom
borderColour: '#888',
borderSize: 4,
constrainSize: false, //in pixels the dimensions you want to constrain on
constrainType: false, //width or height
containLensZoom: false,
cursor: 'inherit', // user should set to what they want the cursor as, if they have set a click function
debug: false,
easing: false,
easingAmount: 12,
enabled: true,
gallery: false,
galleryActiveClass: 'zoomGalleryActive',
gallerySelector: false,
galleryItem: 'a',
galleryEvent: 'click',
imageCrossfade: false,
lensBorderColour: '#000',
lensBorderSize: 1,
lensColour: 'white', //colour of the lens background
lensFadeIn: false,
lensFadeOut: false,
lensOpacity: 0.4, //opacity of the lens
lensShape: 'square', //can be 'round'
lensSize: 200,
lenszoom: false,
loadingIcon: false, //http://www.example.com/spinner.gif
// This change will allow to decide if you want to decrease
// zoom of one of the dimensions once the other reached it's top value,
// or keep the aspect ratio, default behaviour still being as always,
// allow to continue zooming out, so it keeps retrocompatibility.
mantainZoomAspectRatio: false,
maxZoomLevel: false,
minZoomLevel: 1.01,
onComplete: $.noop,
onDestroy: $.noop,
onImageClick: $.noop,
onImageSwap: $.noop,
onImageSwapComplete: $.noop,
onShow: $.noop,
onHide: $.noop,
onZoomedImageLoaded: $.noop,
preloading: 1, //by default, load all the images, if 0, then only load images after activated (PLACEHOLDER FOR NEXT VERSION)
respond: [],
responsive: true,
scrollZoom: false, //allow zoom on mousewheel, true to activate
scrollZoomIncrement: 0.1, //steps of the scrollzoom
showLens: true,
tint: false, //enable the tinting
tintColour: '#333', //default tint color, can be anything, red, #ccc, rgb(0,0,0)
tintOpacity: 0.4, //opacity of the tint
touchEnabled: true,
zoomActivation: 'hover', // Can also be click (PLACEHOLDER FOR NEXT VERSION)
zoomContainerAppendTo: 'body', //zoom container parent selector
zoomId: -1, // identifier for the zoom container
zoomLevel: 1, //default zoom level of image
zoomTintFadeIn: false,
zoomTintFadeOut: false,
zoomType: 'window', //window is default, also 'lens' available -
zoomWindowAlwaysShow: false,
zoomWindowBgColour: '#fff',
zoomWindowFadeIn: false,
zoomWindowFadeOut: false,
zoomWindowHeight: 400,
zoomWindowOffsetX: 0,
zoomWindowOffsetY: 0,
zoomWindowPosition: 1, //Possible values: 1-16, but we can also position with a selector string.
zoomWindowWidth: 400,
zoomEnabled: true, //false disables zoomwindow from showing
zIndex: 999
};
})(window.jQuery, window, document);
// source --> https://webbaze.lt/wp-content/themes/newstore/js/jquery.sticky-sidebar.min.js?ver=5.5.3
/**
* sticky-sidebar - A JavaScript plugin for making smart and high performance.
* @version v3.3.1
* @link https://github.com/abouolia/sticky-sidebar
* @author Ahmed Bouhuolia
* @license The MIT License (MIT)
**/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.StickySidebar=e()}(this,function(){"use strict";"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e(t,e){return t(e={exports:{}},e.exports),e.exports}var i=e(function(t,e){(function(t){Object.defineProperty(t,"__esModule",{value:!0});var l,n,e=function(){function n(t,e){for(var i=0;i=t.containerBottom?(t.translateY=t.containerBottom-e,o="CONTAINER-BOTTOM"):i>=t.containerTop&&(t.translateY=i-t.containerTop,o="VIEWPORT-TOP"):t.containerBottom<=n?(t.translateY=t.containerBottom-e,o="CONTAINER-BOTTOM"):e+t.translateY<=n?(t.translateY=n-e,o="VIEWPORT-BOTTOM"):t.containerTop+t.translateY<=i&&0!==t.translateY&&t.maxTranslateY!==t.translateY&&(o="VIEWPORT-UNBOTTOM"),o}},{key:"_getAffixTypeScrollingUp",value:function(){var t=this.dimensions,e=t.sidebarHeight+t.containerTop,i=t.viewportTop+t.topSpacing,n=t.viewportBottom-t.bottomSpacing,o=this.affixedType;return i<=t.translateY+t.containerTop?(t.translateY=i-t.containerTop,o="VIEWPORT-TOP"):t.containerBottom<=n?(t.translateY=t.containerBottom-e,o="CONTAINER-BOTTOM"):this.isSidebarFitsViewport()||t.containerTop<=i&&0!==t.translateY&&t.maxTranslateY!==t.translateY&&(o="VIEWPORT-UNBOTTOM"),o}},{key:"_getStyle",value:function(t){if(void 0!==t){var e={inner:{},outer:{}},i=this.dimensions;switch(t){case"VIEWPORT-TOP":e.inner={position:"fixed",top:i.topSpacing,left:i.sidebarLeft-i.viewportLeft,width:i.sidebarWidth};break;case"VIEWPORT-BOTTOM":e.inner={position:"fixed",top:"auto",left:i.sidebarLeft,bottom:i.bottomSpacing,width:i.sidebarWidth};break;case"CONTAINER-BOTTOM":case"VIEWPORT-UNBOTTOM":var n=this._getTranslate(0,i.translateY+"px");e.inner=n?{transform:n}:{position:"absolute",top:i.translateY,width:i.sidebarWidth}}switch(t){case"VIEWPORT-TOP":case"VIEWPORT-BOTTOM":case"VIEWPORT-UNBOTTOM":case"CONTAINER-BOTTOM":e.outer={height:i.sidebarHeight,position:"relative"}}return e.outer=c.extend({height:"",position:""},e.outer),e.inner=c.extend({position:"relative",top:"",left:"",bottom:"",width:"",transform:""},e.inner),e}}},{key:"stickyPosition",value:function(t){if(!this._breakpoint){t=this._reStyle||t||!1,this.options.topSpacing,this.options.bottomSpacing;var e=this.getAffixType(),i=this._getStyle(e);if((this.affixedType!=e||t)&&e){var n="affix."+e.toLowerCase().replace("viewport-","")+l;for(var o in c.eventTrigger(this.sidebar,n),"STATIC"===e?c.removeClass(this.sidebar,this.options.stickyClass):c.addClass(this.sidebar,this.options.stickyClass),i.outer){var s="number"==typeof i.outer[o]?"px":"";this.sidebar.style[o]=i.outer[o]+s}for(var r in i.inner){var a="number"==typeof i.inner[r]?"px":"";this.sidebarInner.style[r]=i.inner[r]+a}var p="affixed."+e.toLowerCase().replace("viewport-","")+l;c.eventTrigger(this.sidebar,p)}else this._initialized&&(this.sidebarInner.style.left=i.inner.left);this.affixedType=e}}},{key:"_widthBreakpoint",value:function(){window.innerWidth<=this.options.minWidth?(this._breakpoint=!0,this.affixedType="STATIC",this.sidebar.removeAttribute("style"),c.removeClass(this.sidebar,this.options.stickyClass),this.sidebarInner.removeAttribute("style")):this._breakpoint=!1}},{key:"updateSticky",value:function(){var t,e=this,i=0 https://webbaze.lt/wp-content/themes/newstore/js/skip-link-focus-fix.js?ver=5.5.3
/**
* File skip-link-focus-fix.js.
*
* Helps with accessibility for keyboard only users.
*
* Learn more: https://git.io/vWdr2
*/
( function() {
var isIe = /(trident|msie)/i.test( navigator.userAgent );
if ( isIe && document.getElementById && window.addEventListener ) {
window.addEventListener( 'hashchange', function() {
var id = location.hash.substring( 1 ),
element;
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
return;
}
element = document.getElementById( id );
if ( element ) {
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
element.tabIndex = -1;
}
element.focus();
}
}, false );
}
} )();